<template>
    <div class="global">
    <div class="type">

        <div v-for="item in list" class="typeItem">
            <div>
                <img :src="item.img" style="width: 100px;height: 100%;" alt="">
            </div>
            <div style="width: calc(100% - 100px);">
                <div style="width: 100%;color: #1890ff;">{{ item.typename }}</div>
                <div style="width: 100%;color: #e5e5e5;">{{ item.content }}</div>
            </div>
        </div>
    </div>
</div>
</template>
<script>
import service from '@/request';

export default {
    data() {
        return {
            list: []
        }
    },
    mounted() {
        this.gettype()
    },
    methods: {
        async gettype() {
            const res = await service.get(`/type/list`);
            console.log(res)
            this.list = res.data

        },
    }
}

</script>
<style scoped>
.typeItem {
    width: 25%;
    height: 100px;
    border: 1px solid #eee;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    margin-right: 10px;
    justify-content: space-between;
}

.type {
    width: 100%;
    height: 100%;
    display: flex;

padding: 10px;
box-sizing: border-box;
    background: #fff;
}
.global{
    width: 100%;
    height: 100%;
    
    padding: 10px;
    box-sizing: border-box;
}
</style>